<% letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("") %>

<div class="heading">
  Employees List
</div>

<table id="name_card" border="1">
	<% letters.in_groups_of(6,'') do |row| %>
		
		<tr>
			<% for letter in row %>
				<td><%#= link_to letter,"##{letter}" %>
					<a onclick="$$('div#users_list_right li').invoke('hide');$('<%= letter %>').show();" href="#<%= letter %>"><%= letter %></a>
					
					</td>
			<% end %>
		</tr>
		
	<% end %>
</table>
<div id="users_list_right">
	
  <ul>
    <% for group in @groups %>
      <li id="<%= group %>" style="display:none;" class="group">
       <b> <%= group %></b><a name="<%= group %>"></a>
		<%= link_to image_tag("/images/gtk-go-up.png",:alt=>"Top",
		:title=>"Top",:border => 0),"#top" %>
		<hr/>
		<% @users_group[group].each do |u| %>
			<p>
				<%= link_to "#{u.english_name}--#{u.chinese_name}",user_path(u)  %>
			</p>
		<% end %>
      
      </li>
    <% end %>
  </ul>
</div>
